<template>
  <div>
    <el-button @click="openDialog">打开对话框</el-button>
    <el-dialog title="验证码对话框" :visible.sync="dialogVisible" width="30%" :close-on-click-modal="false">
      <div class="dialog-content">
        <div class="left-section">
          <img src="your-captcha-image-url" alt="验证码图片"/>
        </div>
        <div class="right-section">
          <el-input v-model="captcha" placeholder="请输入验证码"></el-input>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取消</el-button>
        <el-button type="primary" @click="submit">确定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name:'TestMySeft',
  data() {
    return {
      dialogVisible: false,
      captcha: ""
    };
  },
  methods: {
    openDialog() {
      this.dialogVisible = true;
    },
    submit() {
      // 处理提交逻辑
      console.log("验证码为:", this.captcha);
      this.dialogVisible = false;
    }
  }
};
</script>

<style>
.dialog-content {
  display: flex;
  align-items: center;
}

.left-section {
  flex: 1;
}

.right-section {
  flex: 1;
  padding-left: 20px;
}

.dialog-footer {
  text-align: right;
}
</style>